<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>FoX_common</title>
  <link rel="stylesheet" type="text/css" href="DoX.css"/>
</head>
<body>
  <div class="DoX">
<h1>FoX_common</h1>

<p>FoX_common is a module exporting interfaces to a set of convenience functions common to all of the FoX modules, which are of more general use.</p>

<p>Currently, there are three publically available functions and four subroutines:</p>

<ul>
<li>The subroutine <code>str</code> converts primitive datatypes into strings in a consistent fashion, conformant with the expectations of XML processors.</li>
</ul>

<p>It is fully described in <a href="StringFormatting.html">StringFormatting</a></p>

<ul>
<li><p>The subroutine <code>rts</code> performs the reverse function, taking a string (obtained from an XML document) and converts it into a primitive Fortran datatype.</p></li>
<li><p>The function <code>countrts</code> examinies a string and determines the size of array requiered to hold all its data, once converted to a primitive Fortran datatype.</p></li>
</ul>

<p>It is fully described in <a href="StringConversion.html">StringConversion</a></p>

<p>The final four procedures change the way that errors and warnings are handled when encounterd by any FoX modules. Using these procedures it is possible to convert non-fatal warnings and fatal errors to calls to the internal about routine. This generally has the effect of generating a stack trace or core dump of the program before temination. This is a global setting for all XML documents being manipulated. Two subroutines take a single logical argument to turn on (true) and off (false) the feature for warnings and errors respectivly:</p>

<ul>
<li><p><code>FoX_set_fatal_warnings</code> for warnings </p></li>
<li><p><code>FoX_set_fatal_errors</code> for errors</p></li>
</ul>

<p>and two functions (without arguments) allow the state to be checked:</p>

<ul>
<li><p><code>FoX_get_fatal_warnings</code> for warnings</p></li>
<li><p><code>FoX_get_fatal_errors</code> for errors</p></li>
</ul>

<p>Both fatal warnings and errors are off by default. This corresponds to the previous behaviour. </p>
</div>
</body>
</html>
